package zmm

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/zmm/model/entity/association"
)

type ZmmOrderListReq struct {
	g.Meta        `path:"/zmm_order/list" tags:"订单管理" method:"get" summary:"订单列表" security:"bearer"`
	Name          string `p:"name"`
	Status        string `p:"status"`
	OrderNum      string `p:"OrderNum"`
	StartTime     string `p:"start_time"`
	EndTime       string `p:"end_time"`
	IsOut         string `p:"is_out"`
	IsAppointment string `p:"is_appointment"`
	ShopId        string `p:"shop_id"`
	MemberId      string `p:"member_id"`
	EmployeeId    string `p:"employee_id"`
	commonApi.PageReq
}

type ZmmOrderListRes struct {
	g.Meta `mime:"application/json"`
	List   []*association.ZmmOrder `json:"list"`
	commonApi.ListRes
}

type ZmmOrderEditReq struct {
	g.Meta                    `path:"/zmm_order/edit" tags:"订单管理" method:"post" summary:"订单修改" security:"bearer"`
	ID                        uint64   `p:"id" v:"integer#ID必须为数字" summary:"ID" d:"0"`
	Name                      string   `p:"name" v:"required#请输入员工名称" d:""`
	Contact                   string   `p:"contact" v:"required#请输入联系方式" d:""`
	Remark                    string   `p:"remark" d:""`
	Status                    uint8    `p:"status" v:"required|integer|in:0,1,2#请选择状态|状态类型有误|状态格式有误" d:"1"`
	ShopId                    uint64   `p:"shop_id"  v:"required|integer#请选择店铺|店铺信息有误" d:"0"`
	OrderNum                  string   `p:"order_num" v:"required#订单号有误" d:""`
	MemberId                  uint64   `p:"member_id" d:"0"`
	Address                   string   `p:"address" d:""`
	StartTime                 string   `p:"start_time" d:"required#请输入开始时间"`
	EndTime                   string   `p:"end_time" d:""`
	Type                      uint8    `p:"type" v:"required|integer|in:1,2,3#请选择类型|类型信息有误|类型格式有误" d:"1"`
	IsOut                     string   `p:"is_out" v:"required|integer|in:0,1#请选择是否外出|是否外出信息有误|是否外出格式有误" d:"0"`
	IsAppointment             string   `p:"is_appointment" v:"required|integer|in:0,1#请选择是否预约|是否预约信息有误|是否预约格式有误" d:"0"`
	Money                     float64  `p:"money" v:"required|float#请输入金额|金额格式错误" d:"0"`
	CustomerServiceEmployeeId uint64   `p:"customer_service_employee_id" d:"0"`
	EmployeeIds               []uint64 `p:"employee_ids" d:""`
}
type ZmmOrderEditRes struct {
	g.Meta `mime:"application/json"`
	ID     uint64 `json:"id"`
}

type ZmmOrderDelReq struct {
	g.Meta `path:"/zmm_order/delete" tags:"订单管理" method:"delete" summary:"订单删除" security:"bearer"`
	ID     uint64 `p:"id" v:"required|integer#ID参数错误|ID必须为数字" summary:"ID" d:"0"`
}
type ZmmOrderDelRes struct{}
